<?php
	include_once("TestCase.php");
	include_once("WasRun.php");

	class TestCaseTest extends TestCase
	{
		public function testTemplateMethod()
		{
			$test = new WasRun("testMethod");
			$test->run();
			assert("setUp testMethod tearDown " == $test->log);
		}

		public function testResult()
		{
			$test = new WasRun("testMethod");
			$result = $test->run();

			assert("1 run, 0 failed" == $result->summary());
		}

		public function testFailedResult()
		{
			$test = new WasRun("testBrokenMethod");
			$result = $test->run();

			assert("1 run, 1 failed" == $result->summary());
		}
	}

	$test = new TestCaseTest("testTemplateMethod");
	$test->run();

	$test = new TestCaseTest("testResult");
	$test->run();

	$test = new TestCaseTest("testFailedResult");
	$test->run();
?>